package org.example.thread.thread01;

import java.util.concurrent.Callable;

/**
 * @Auther:Liu
 * @Testname:Demo03
 * @Date:2025/8/14 10:44
 */
public class Demo03 implements Callable<String> {
    @Override
    public String call() throws Exception {
        String name = Thread.currentThread().getName();
        for (int i = 0; i < 10; i++) {
            System.out.println("当前线程的名字是:"+name+"，执行了第"+i+"次");
        }
        return "当前线程的名字是:"+name;
    }


}
